import 'package:flutter/material.dart';

void showPhotoDialog(BuildContext context, Function callback) {
  showModalBottomSheet(
      context: context,
      builder: (BuildContext ctx) {
        return SizedBox(
          width: double.infinity,
          height: 180,
          child: Column(children: [
            Container(
                width: double.infinity,
                height: 60,
                //下边框
                decoration: const BoxDecoration(
                  border: Border(
                    bottom: BorderSide(color: Colors.grey, width: 0.5),
                  ),
                ),
                child: GestureDetector(
                  onTap: () {},
                  child: const Row(
                    //主轴居中
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      //相机图标
                      Icon(Icons.camera_alt),
                      SizedBox(
                        width: 15,
                      ),
                      Text('拍照')
                    ],
                  ),
                )),
            Container(
                width: double.infinity,
                height: 60,
                //下边框
                decoration: const BoxDecoration(
                  border: Border(
                    bottom: BorderSide(color: Colors.grey, width: 0.5),
                  ),
                ),
                child: GestureDetector(
                  onTap: () async {
                    callback();
                  },
                  child: const Row(
                    //主轴居中
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      //相册图标
                      Icon(Icons.photo_library),

                      SizedBox(
                        width: 15,
                      ),
                      Text('相册')
                    ],
                  ),
                )),
            Container(
              width: double.infinity,
              height: 60,
              //下边框
              decoration: const BoxDecoration(
                border: Border(
                  bottom: BorderSide(color: Colors.grey, width: 0.5),
                ),
              ),
              child: const Row(
                //主轴居中
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  //取消图标
                  Icon(Icons.cancel),

                  SizedBox(
                    width: 15,
                  ),
                  Text('取消')
                ],
              ),
            ),
          ]),
        );
      });
}
